package com.wgz.mcp.conf;

import io.metaloom.qdrant.client.grpc.QDrantGRPCClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class EmdeddingConfig {
    @Value("${spring.vectorstore.qdrant.host}")
    private String qdrantHost;

    @Value("${spring.vectorstore.qdrant.port}")
    private String qdrantPort;

    @Bean
    public QDrantGRPCClient getQDrantGRPCClient(){
        QDrantGRPCClient client = QDrantGRPCClient.builder()
                .setHostname(qdrantHost)
                .setPort(Integer.parseInt(qdrantPort))
                .build();
        return client;
    }
}